package demo8;

import java.util.Scanner;

public class ArrayQueueMain {
    public static void main(String[] args){
        Scanner in=new Scanner(System.in);
        System.out.println("请输入队列中元素个数：");
        int k=in.nextInt();
        ArrayQueue queue=new ArrayQueue(k);
        queue.enQueue(9);
        queue.enQueue(8);
        queue.enQueue(7);
        queue.enQueue(6);
        queue.enQueue(5);
        queue.enQueue(4);
        queue.display();
       int val= queue.deQueue();
       System.out.println("出队列的是："+val);
       int val2=queue.Front();
       System.out.println("队头元素为："+val2);
       int val3=queue.Rear();
       System.out.println("队尾元素为："+val3);
    }

}
